package com.scs.dao;

import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
import com.scs.pojo.Identity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface identityMapper {
    @Insert("insert into IdentityForm(identityId,Identity,description) values(#{identityId},#{identity},#{description})")
    int addIdentity(Identity identity);

    @Delete("delete from IdentityForm where identityId=#{identityId}")
    int deleteIdentity(Integer identityId);

    @Update("update IdentityForm set identity=#{arg0} ,description=#{arg1} where identityId=#{arg2}")
    int updateIdentity(String identity,String description,Integer identityId);

    @Select("select * from IdentityForm")
    List<Identity> getAllIdentity();

}
